#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include "worker.h"

#include <QMainWindow>
#include <QThread>

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow {
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

signals:
    void msg3(const QString &m2);

private slots:
    void on_pushButtonStart_clicked();

    void on_pushButtonStop_clicked();

    void on_pushButtonMsg1_clicked();

    void on_pushButtonMsg2_clicked();
    void on_pushButtonMsg3_clicked();

    void workerDetach();

    void msg2Slot(const QString &m2);

private:
    Ui::MainWindow *ui;

    QThread *thread;
    Worker *worker;
};
#endif // MAINWINDOW_H
